from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
    return LaunchDescription([
        # 激光雷达发布节点
        Node(
            package='robot_control',
            executable='lidar_publisher',
            name='lidar_publisher',
            output='screen',
            parameters=[{'publish_frequency': 10.0}]
        ),
        
        # 障碍物检测节点
        Node(
            package='robot_control',
            executable='obstacle_detector',
            name='obstacle_detector',
            output='screen',
            parameters=[{'obstacle_threshold': 0.5}]
        ),
        
        # 状态服务节点
        Node(
            package='robot_control',
            executable='state_service',
            name='state_service',
            output='screen',
            parameters=[
                {'max_linear_speed': 0.2},
                {'lidar_publish_frequency': 10.0},
                {'obstacle_threshold': 0.5}
            ]
        ),
        
        # 动作服务器节点
        Node(
            package='robot_control',
            executable='move_action_server',
            name='move_action_server',
            output='screen'
        ),
    ])